package com.fangqiang.sprint_boot_web1.validate.server;

import com.fangqiang.sprint_boot_web1.validate.data.Person;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

// *** 这个注解必须加，表示这个类中的方法开启校验
@Validated
@Service
public class ValidateTest2 {

    public void a(@Valid Person person){
        System.out.println();
    }
}

